import request from '@/utils/request'

export function findList(data) {
    return request({
        url: '/terminalShops',
        method: 'get',
        params: data,
    })
}
//无分页
export function findShopList() {
    return request({
        url: '/terminalShops/findShopList',
        method: 'get'
    })
}
export function save(data) {
    if(data.id == null){
        return request({
            url: '/terminalShops',
            method: 'post',
            data: data,
        })
    }else{
        return request({
            url: '/terminalShops/'+data.id,
            method: 'put',
            data: data,
        })
    }

}
export function findDetail(id) {
    return request({
        url: '/terminalShops/'+id,
        method: 'get',
    })
}
export function findDetailByCompany() {
    return request({
        url: '/terminalShops/findByCompany',
        method: 'get',
    })
}
export function deleted(id) {
    return request({
        url: '/terminalShops/'+id,
        method: 'delete',
    })
}
export function changeStatus(id,status) {
  return request({
    url: '/terminalShops/changeStatus/'+id,
    method: 'put',
    params:{'status':status}
  })

}

